#include "stdlib.h"
#include "stdio.h"
#include "string.h"

//char *p = "abcd1111abcd222abcd3333" 请你找出字符串abcd出现的次数


void main()
{
	char *p = "abcd1111abcd222abcd3333";
	int ncout = 0;
	do 
	{
		p = strstr(p, "abcd");
		if (p == NULL) //没有找到则跳出来
		{
			break;
		}
		else 
		{
			ncout++;
			p = p + strlen("abcd");
		}
		
	} while (*p != '\0');
	printf("ncout:%d\n", ncout);
	system("pause");
	
}
